"use strict";
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("electronAPI", {
  // 获取应用版本
  getAppVersion: () => ipcRenderer.invoke("app-version"),
  // 窗口控制
  minimize: () => ipcRenderer.send("window-minimize"),
  maximize: () => ipcRenderer.send("window-maximize"),
  close: () => ipcRenderer.send("window-close"),
  // 系统信息
  getPlatform: () => process.platform
});
contextBridge.exposeInMainWorld("constants", {
  isDev: !process.env.NODE_ENV || process.env.NODE_ENV === "development"
});
